package com.tecteam.console;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity {

    private Button Btn1;
    private Button Btn2;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Btn1 = (Button) findViewById(R.id.on);
        Btn2 = (Button) findViewById(R.id.off);

        Btn1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(MainActivity.this, "The light is ON.", Toast.LENGTH_SHORT).show();
            }
        });
        Btn2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(MainActivity.this, "The light is OFF.", Toast.LENGTH_SHORT).show();
            }
        });
    }

    public void Intent(View view) {
        Intent intent = new Intent(MainActivity.this,SettingActivity.class);
        startActivity(intent);
    }


}